package com.coolgor.axnut.enums.auth;

public enum GenderEnum {
	FEMALE(0,"女性"),
	MALE(1,"男性"),
	UNKNOWN(2, "中性");

	private int state;

	private String stateInfo;

	private GenderEnum(int state, String stateInfo) {
		this.state = state;
		this.stateInfo = stateInfo;
	}

	public int getState() {
		return state;
	}

	public String getStateInfo() {
		return stateInfo;
	}

	public static GenderEnum stateOf(int index) {
		for (GenderEnum state : values()) {
			if (state.getState() == index) {
				return state;
			}
		}
		return null;
	}
}
